Skip to content

Release v0.7.0: Ship .sf-btn and .sf-card components - #544

Merged
jackgranatowski merged 4 commits into
mainfrom
claude/card-button-components-1qsy3r
Jul 6, 2026
Merged

Release v0.7.0: Ship .sf-btn and .sf-card components#544
jackgranatowski merged 4 commits into
mainfrom
claude/card-button-components-1qsy3r

Conversation

@jackgranatowski

@jackgranatowski jackgranatowski commented Jul 5, 2026

Copy link
Copy Markdown
Contributor

Summary

This release ships the first tranche of SLASHED components: .sf-btn (button) and .sf-card (card). Both components are now live in the slashed.components layer and included in the *-components and full bundles. Remaining reserved components (badge, tag, alert, avatar, modal, skeleton, form layout helpers, table) remain staged and commented out.

Key Changes

  • Components: Uncommented and activated .sf-btn and .sf-card in optional/components.css
  • Component tokens: Added 19 new button tokens (--sf-btn-*) to optional/tokens.components.css for border width, font size/weight, gap, and min-height
  • Documentation: Updated docs/components.md to reflect live component status and landing timeline
  • Tests: Added comprehensive Playwright e2e test suites for both .sf-btn (tests/button.spec.js) and .sf-card (tests/card.spec.js)
  • API indices: Regenerated all token registries, class indices, and API documentation to reflect 706 total tokens (19 new) and 237 total .sf-* classes (26 new)
  • Configurator: Updated UI panels and preview to include button token controls
  • Version: Bumped to 0.7.0 across all version artifacts (root package.json, configurator, docs, badges headers)

Implementation Details

  • Button tokens follow the established consumption-tier pattern, aliasing to core tokens (e.g., --sf-btn-border-width--sf-border-width-1)
  • Component tokens are scoped to optional/tokens.components.css and only loaded when components bundle is used
  • State classes (.is-disabled, .is-loading) now correctly grouped under .sf-btn instead of generic categories
  • All generated indices and registries updated via npm run build and npm run docs
  • Version sync verified with npm run check:version

https://claude.ai/code/session_013rU5ZV8C3RqDLbrXM41aMh

Summary by CodeRabbit

  • New Features

    • Released the first .sf-btn and .sf-card components in version 0.7.0.
    • Added new button and card styling options, including size, outline, ghost, elevated, bordered, and interactive variants.
    • Expanded documentation with live examples, usage guidance, and a copy-paste gradient-outline button recipe.
  • Bug Fixes

    • Improved loading and reduced-motion behavior for buttons and interactive cards.
    • Added coverage to verify button and card rendering across light and dark themes.

claude added 2 commits July 5, 2026 11:26
Activate the first component tranche — previously fully written but staged
(commented out) in optional/components.css "until v0.8".

Buttons (.sf-btn):
- Refactor colour families to rule-local --sf-btn-color/-hover/-on-color so
  the new --outline modifier composes orthogonally with any family.
- Add --outline (fills on hover), a size scale (--xs/--s/--l/--xl), and gate
  the .is-loading spinner behind prefers-reduced-motion.
- Activate the --sf-btn-gap/-font-size/-font-weight/-min-height/-border-width
  knobs.

Cards (.sf-card):
- Activate the base component + subcomponents and the full --sf-card-* token
  block; add --bordered/--elevated/--interactive modifiers (interactive lift
  gated behind prefers-reduced-motion).

Docs/tests/tooling:
- Reconcile docs/components.md to the real .sf-btn name (was mis-promised as
  .sf-button), add HTML examples + a gradient-outline recipe; annotate the new
  tokens; update llm-guide and roadmap.
- Add tests/button.spec.js + tests/card.spec.js (light + dark).
- Configurator: add card-token controls, refresh the preview mirror note.
- Bump to 0.7.0 and regenerate all token/doc/registry artifacts; refresh the
  token API snapshot and full-api audit token report.

Closes #493, #494, #486. Advances #384.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rU5ZV8C3RqDLbrXM41aMh
The file header still said "all definitions are commented out until
v0.8", left over from before .sf-btn/.sf-card shipped in v0.7.0. Update
it to reflect that those two are live; only the remaining components
stay staged.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rU5ZV8C3RqDLbrXM41aMh
@coderabbitai

coderabbitai Bot commented Jul 5, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@jackgranatowski, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 39 minutes

Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available.
You're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please refer docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: 314c4945-5feb-4b16-bb63-f6e78a6885fa

📥 Commits

Reviewing files that changed from the base of the PR and between 66aedb8 and ee379e2.

📒 Files selected for processing (8)
  • configurator/src/data/classes.generated.json
  • core/states.css
  • docs/api-index.json
  • docs/api-index.md
  • docs/components.md
  • docs/llm-guide.md
  • optional/tokens.components.css
  • tests/button.spec.js
📝 Walkthrough

Walkthrough

This PR activates the previously staged .sf-btn and .sf-card components: uncommenting and implementing their design tokens and CSS rules, adding Playwright test coverage, regenerating configurator/docs/token-reference artifacts, and bumping package versions to 0.7.0.

Changes

Component activation

Layer / File(s) Summary
Core CSS implementation
optional/components.css, optional/tokens.components.css
Uncomments button/card tokens, refactors .sf-btn to use rule-local color variables, gates loading spinner and interactive card animation on reduced-motion, and enables .sf-card bordered/elevated/interactive modifiers.
Component tests
tests/button.spec.js, tests/card.spec.js
Adds Playwright suites covering button/card layout, color/style/size variants, states, focus, and geometry across light/dark themes.
Configurator generated data and UI wiring
configurator/src/data/*.generated.json, configurator/src/components/panels/BordersPanel.svelte, configurator/src/components/shell/PreviewPanel.svelte, configurator/package.json
Regenerates token/class registries with new .sf-btn/.sf-card entries, adds card radius/padding sliders, and updates preview comment; bumps configurator version.
Documentation and generated references
CHANGELOG.md, docs/components.md, docs/llm-guide.md, docs/roadmap.md, docs/api-index.md, docs/classes.md, docs/token-index.md, docs/token-index.json, docs/tokens.md, docs/registry.json, docs/token-annotations.json, badges/css-custom-data.json, docs/test-coverage-6-token-reference.html
Documents the shipped .sf-btn/.sf-card components with examples and a gradient-outline recipe, and regenerates token/class counts and tables across reference docs.
Root token registry, audit reports, versions
token-registry.json, reports/full-api-audit/results/tokens-report.json, tests/token-api.snapshot.json, package.json
Appends new token ids to the root registry, updates audit report rows/counts, extends the token snapshot, and bumps the package version.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

Not applicable — this PR is primarily CSS token activation, generated data regeneration, documentation, and test additions without multi-component runtime interaction flow.

Possibly related issues

Possibly related PRs

  • codeslash-dev/SLASHED#79: Introduced the reserved, commented-out .sf-btn/.sf-card token and CSS definitions that this PR uncomments and extends.
  • codeslash-dev/SLASHED#351: Introduced the token-annotations and API index generator systems that this PR's new annotation/index entries depend on.
  • codeslash-dev/SLASHED#442: Modifies the same .sf-btn/.sf-card implementation surfaces including nested button font-size handling via --sf-card-btn-font-size.

Suggested labels: codex

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: releasing v0.7.0 and shipping the .sf-btn and .sf-card components.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/card-button-components-1qsy3r

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@qodo-code-review

Copy link
Copy Markdown

PR Summary by Qodo

Release v0.7.0: ship live .sf-btn and .sf-card components

✨ Enhancement 🧪 Tests 📝 Documentation ⚙️ Configuration changes 🕐 40+ Minutes

Grey Divider

AI Description

• Activate live .sf-btn and .sf-card in @layer slashed.components (v0.7.0).
• Add component tokens and regenerate registries / API indices for new surface area.
• Add Playwright e2e suites validating button/card behaviour in light and dark themes.
Diagram

graph TD
  A["optional/components.css"] --> B[".sf-btn/.sf-card"] --> C["badges/*.css bundles"]
  D["optional/tokens.components.css"] --> E["--sf-btn-* / --sf-card-*"] --> C["badges/*.css bundles"]
  C["badges/*.css bundles"] --> F["Playwright e2e"]
  E["--sf-btn-* / --sf-card-*"] --> G["Generated API/docs"]
  G["Generated API/docs"] --> H["Configurator UI"]

  subgraph Legend
    direction LR
    _src["Source CSS"] ~~~ _gen["Generated artifacts"] ~~~ _test["Tests"]
  end
Loading
High-Level Assessment

The following are alternative approaches to this PR:

1. Keep components staged; ship tokens only
  • ➕ Minimizes visible API surface change and adoption risk
  • ➕ Avoids bundling/semantic changes in class indices immediately
  • ➖ Delays real-world feedback on component ergonomics
  • ➖ Tokens without live components are harder to validate and document
2. Ship as separate package (e.g., slashed-components)
  • ➕ Decouples component release cadence from core tokens/utilities
  • ➕ Reduces churn in generated core docs for non-component users
  • ➖ More packaging/CI complexity and versioning overhead
  • ➖ Harder for users to discover correct bundles and token sources
3. Implement colour/treatment variants as distinct classes (no rule-local vars)
  • ➕ Simpler mental model in pure CSS; fewer custom properties
  • ➕ Less reliance on rule-local property composition
  • ➖ Explosion of selector combinations and duplication
  • ➖ Loses the orthogonality that makes --outline compose with all families

Recommendation: The PR’s approach is the best fit for this framework: activating .sf-btn/.sf-card in the existing slashed.components layer while keeping the rest staged preserves the planned rollout, and the rule-local colour-family model enables orthogonal composition (--outline + any family) without combinatorial selector growth. The main thing to watch in review is correctness/consistency of the generated artifacts and bundle inclusion; the added Playwright suites help mitigate behavioural regressions.

Files changed (28) +8963 / -5712

Enhancement (5) +539 / -110
css-custom-data.jsonRegister button/card component tokens for editor tooling +98/-3

Register button/card component tokens for editor tooling

• Adds CSS custom data entries for new '--sf-btn-*' and '--sf-card-*' tokens (descriptions/defaults) and refines existing button token descriptions to be component-specific.

badges/css-custom-data.json

BordersPanel.svelteExpose card border/padding/radius controls in configurator +2/-0

Expose card border/padding/radius controls in configurator

• Adds configurator slider controls for '--sf-card-radius' (inner) and '--sf-card-padding' alongside existing button/field border controls.

configurator/src/components/panels/BordersPanel.svelte

classes.generated.jsonAdd '.sf-btn'/'.sf-card' to generated class index; regroup states +262/-2

Add '.sf-btn'/'.sf-card' to generated class index; regroup states

• Introduces component class entries for '.sf-btn' and '.sf-card' (and modifiers/subcomponents) and re-groups '.is-disabled' / '.is-loading' under the '.sf-btn' group for documentation/indexing consistency.

configurator/src/data/classes.generated.json

components.cssActivate '.sf-btn' and '.sf-card' component CSS (v0.7.0) +150/-80

Activate '.sf-btn' and '.sf-card' component CSS (v0.7.0)

• Uncomments and ships '.sf-btn' and '.sf-card' definitions in '@layer slashed.components'. Refactors button colour handling via rule-local '--sf-btn-color*' vars to keep '--outline' orthogonal, adds size scale and motion-gated loading spinner animation, and activates card modifiers ('--bordered', '--elevated', '--interactive') with reduced-motion gating.

optional/components.css

tokens.components.cssActivate button knobs and complete card token block +27/-25

Activate button knobs and complete card token block

• Promotes previously commented component token defaults to live declarations, adding button geometry/typography tokens ('--sf-btn-gap', '--sf-btn-font-size', '--sf-btn-font-weight', '--sf-btn-min-height', '--sf-btn-border-width') and completing card tokens including shadow escalation values.

optional/tokens.components.css

Tests (3) +314 / -0
button.spec.jsAdd Playwright behavioural coverage for '.sf-btn' +182/-0

Add Playwright behavioural coverage for '.sf-btn'

• Introduces e2e assertions for '.sf-btn' computed styles across light/dark themes: base fill, WCAG min target height, semantic families, treatments ('--secondary'/'--ghost'/'--outline'), size ordering, block width, disabled/loading states, and focus-visible outline presence.

tests/button.spec.js

card.spec.jsAdd Playwright behavioural coverage for '.sf-card' +113/-0

Add Playwright behavioural coverage for '.sf-card'

• Adds e2e assertions for '.sf-card' across light/dark themes: padding/border/shadow/radius math, header/footer dividers, bordered/elevated/interactive modifiers, nested button font-size override, and '__media' aspect ratio.

tests/card.spec.js

token-api.snapshot.jsonUpdate token API snapshot for new component tokens +19/-0

Update token API snapshot for new component tokens

• Extends the token snapshot list to include all newly introduced '--sf-btn-*' and '--sf-card-*' token names.

tests/token-api.snapshot.json

Documentation (14) +7547 / -5590
CHANGELOG.mdDocument v0.7.0 component tranche additions +4/-0

Document v0.7.0 component tranche additions

• Adds unreleased changelog entries describing '.sf-btn' and '.sf-card' shipping, their modifiers/states, and newly activated component tokens and docs updates.

CHANGELOG.md

PreviewPanel.svelteUpdate preview notes for shipped components vs staged ones +5/-3

Update preview notes for shipped components vs staged ones

• Adjusts preview documentation comments to reflect '.sf-btn'/'.sf-card' shipping in v0.7.0 while keeping pv-* demo equivalents isolated from bundle selection.

configurator/src/components/shell/PreviewPanel.svelte

api-index.jsonRegenerate machine-readable API index for new tokens/classes +6516/-5421

Regenerate machine-readable API index for new tokens/classes

• Updates generated API index totals (992 elements: 706 tokens, 286 classes) and includes component tokens/classes in the published API data.

docs/api-index.json

api-index.mdUpdate API index doc with new counts and component surface +60/-10

Update API index doc with new counts and component surface

• Refreshes counts and tables to reflect 706 tokens, 286 classes, and expanded component token list; adds the Components class section entries.

docs/api-index.md

classes.mdAdd Components section to class reference +36/-1

Add Components section to class reference

• Updates generated class reference counts and appends a Components section listing '.sf-btn'/'.sf-card' selectors and states.

docs/classes.md

components.mdPublish '.sf-btn' and '.sf-card' docs with examples and recipe +216/-39

Publish '.sf-btn' and '.sf-card' docs with examples and recipe

• Replaces pre-v1 staged notice with v0.7.0 live status; documents '.sf-btn' and '.sf-card' usage, modifiers, and tokens; adds a gradient-outline button recipe and clarifies staged components.

docs/components.md

llm-guide.mdUpdate LLM guide component token block and component status +29/-2

Update LLM guide component token block and component status

• Expands the component token reference to include new button tokens and the full card token set, and notes '.sf-btn'/'.sf-card' are live since 0.7.0.

docs/llm-guide.md

registry.jsonRegenerate registry counts and include new tokens/classes +47/-2

Regenerate registry counts and include new tokens/classes

• Updates generated registry metadata (706 tokens, 237 '.sf-*' classes) and enumerations to include '.sf-btn'/'.sf-card' surface area.

docs/registry.json

roadmap.mdUpdate roadmap for v0.7.0 component shipment +22/-23

Update roadmap for v0.7.0 component shipment

• Bumps current version to 0.7.0 and marks the first component tranche (including outline button) as shipped; adjusts future staging notes for remaining components.

docs/roadmap.md

token-annotations.jsonAdd annotations for new component tokens and classes +48/-0

Add annotations for new component tokens and classes

• Adds human-readable descriptions for new '--sf-btn-*' / '--sf-card-*' tokens and for '.sf-btn'/'.sf-card' class entries for downstream docs/tooling.

docs/token-annotations.json

token-index.jsonRegenerate token index JSON for 706 tokens +155/-3

Regenerate token index JSON for 706 tokens

• Updates token counts/roles and adds index entries for newly introduced component tokens, including file provenance ('optional/tokens.components.css').

docs/token-index.json

token-index.mdUpdate token index markdown counts and include new tokens +22/-3

Update token index markdown counts and include new tokens

• Refreshes token totals and adds the new component tokens to the per-file/role listings.

docs/token-index.md

tokens.mdRegenerate token reference for expanded component tokens +21/-2

Regenerate token reference for expanded component tokens

• Updates generated token reference counts and expands Component tokens section from 6 to 25 tokens including button/card additions.

docs/tokens.md

tokens-report.jsonUpdate full API token audit report for new token set +366/-81

Update full API token audit report for new token set

• Regenerates the audit report to reflect 706 tokens and includes entries for new component tokens (including computed/empty checks).

reports/full-api-audit/results/tokens-report.json

Other (6) +563 / -12
package.jsonBump configurator version to 0.7.0 +1/-1

Bump configurator version to 0.7.0

• Updates the configurator package version to align with the v0.7.0 release.

configurator/package.json

api-index.generated.jsonSync configurator API index to 706 tokens / 25 component tokens +406/-7

Sync configurator API index to 706 tokens / 25 component tokens

• Regenerates the configurator’s synced API index (hash + counts) and includes newly added component tokens (and associated metadata) from docs.

configurator/src/data/api-index.generated.json

token-registry.generated.jsonRegenerate configurator token registry IDs for new tokens +77/-1

Regenerate configurator token registry IDs for new tokens

• Updates generated token registry (nextId and appended token names) to include new '--sf-btn-*' and '--sf-card-*' entries.

configurator/src/data/token-registry.generated.json

test-coverage-6-token-reference.htmlRefresh token reference coverage list for new component tokens +1/-1

Refresh token reference coverage list for new component tokens

• Updates the generated token list used in token reference coverage to include '--sf-btn-*' and '--sf-card-*' tokens.

docs/test-coverage-6-token-reference.html

package.jsonBump root package version to 0.7.0 +1/-1

Bump root package version to 0.7.0

• Updates the framework version from 0.6.35 to 0.7.0 for release synchronization.

package.json

token-registry.jsonRegenerate root token registry IDs for new tokens +77/-1

Regenerate root token registry IDs for new tokens

• Updates the root token registry (nextId and appended token list) to include the new button/card component tokens.

token-registry.json

@coderabbitai coderabbitai Bot added the codex label Jul 5, 2026
@qodo-code-review

qodo-code-review Bot commented Jul 5, 2026

Copy link
Copy Markdown

Code Review by Qodo

🐞 Bugs (0) 📘 Rule violations (0) 📜 Skill insights (0)

Context used
✅ Compliance rules (platform): 12 rules

Grey Divider


Action required

1. --sf-card-media-radius missing in llm-guide ✓ Resolved 📘 Rule violation ⚙ Maintainability
Description
The new component token --sf-card-media-radius is defined and registered, but it is not documented
in docs/llm-guide.md alongside the other .sf-card tokens. This leaves the token documentation
out of sync with the source token set.
Code

docs/llm-guide.md[R1056-1069]

+/* Cards — .sf-card (live since 0.7.0) */
+--sf-card-padding:          var(--sf-space-l)
+--sf-card-gap:              var(--sf-space-m)
+--sf-card-radius:           var(--sf-radius-m)
+--sf-card-radius-outer:     calc(var(--sf-card-radius) + var(--sf-card-padding))  /* concentric */
+--sf-card-bg:               var(--sf-color-surface)
+--sf-card-border-width:     var(--sf-border-width-1)
+--sf-card-border-color:     var(--sf-color-border)
+--sf-card-shadow:           var(--sf-shadow-s)
+--sf-card-shadow--elevated: var(--sf-shadow-l)
+--sf-card-shadow--hover:    var(--sf-shadow-l)
+--sf-card-media-ratio:      var(--sf-ratio-video)
+--sf-card-heading-size:     var(--sf-text-xl)
+--sf-card-btn-font-size:    var(--sf-text-s)
Relevance

⭐⭐⭐ High

CI gate + CLAUDE mandate keep llm-guide synced; similar llm-guide updates merged in PRs.

PR-#383
PR-#516

ⓘ Recommendations generated based on similar findings in past PRs

Evidence
Rule 1353212 requires docs/llm-guide.md to stay in sync with token additions/removals. The token
--sf-card-media-radius is newly present in optional/tokens.components.css and
token-registry.json, but the updated .sf-card token list in docs/llm-guide.md omits it.

Rule 1353212: Keep token role/tier/behavior docs in sync with source changes
optional/tokens.components.css[27-33]
token-registry.json[2949-2952]
docs/llm-guide.md[1056-1069]

Agent prompt
The issue below was found during a code review. Follow the provided context and guidance below and implement a solution

## Issue description
`--sf-card-media-radius` was added to the token sources/registry but is missing from the component token list in `docs/llm-guide.md`.

## Issue Context
This PR adds new `.sf-card` component tokens in `optional/tokens.components.css` and registers them in `token-registry.json`. The llm-guide token catalog should list all newly-added component tokens.

## Fix Focus Areas
- docs/llm-guide.md[1056-1069]
- optional/tokens.components.css[27-33]
- token-registry.json[2949-2952]

ⓘ Copy this prompt and use it to remediate the issue with your preferred AI generation tools


Grey Divider

Qodo Logo

Comment thread docs/llm-guide.md

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
optional/components.css (1)

174-198: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win

.is-loading doesn't block pointer interaction, unlike :disabled/.is-disabled.

The disabled state sets pointer-events: none, but .sf-btn.is-loading only sets cursor: wait and hides content — the button remains clickable while loading. This risks duplicate/concurrent submissions on non-idempotent actions (e.g. form submit handlers) if the button isn't also explicitly disabled by the consumer.

🛡️ Suggested fix
 .sf-btn.is-loading {
   cursor:   wait;
   position: relative;
+  pointer-events: none;
 }
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@optional/components.css` around lines 174 - 198, The .sf-btn.is-loading state
currently only changes the cursor and hides content, so it still allows clicks
unlike the disabled states. Update the `.sf-btn.is-loading` rule in
`components.css` to also block pointer interaction the same way
`.sf-btn:disabled` and `.sf-btn.is-disabled` do, so loading buttons cannot be
activated again while async work is in progress. Keep the spinner and visibility
behavior in `.sf-btn.is-loading::after` unchanged.
🧹 Nitpick comments (2)
tests/button.spec.js (1)

1-182: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick win

Solid coverage of colour families, style treatments, sizes, and states.

Tests correctly exercise the refactored rule-local custom-property model (semantic families, --secondary/--ghost/--outline composition, hover behavior). One gap: the size-scale test only compares xs < m < xl, so it wouldn't catch a potential --l/--xl min-height collision (see comment on optional/components.css). Consider adding an l assertion between m and xl for full scale coverage.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@tests/button.spec.js` around lines 1 - 182, The size-scale coverage in the
.sf-btn Playwright spec is incomplete because the current height ordering test
only checks xs, m, and xl, so it could miss a collision between the l and xl
sizes. Update the size-scale test in the button spec to include an sf-btn--l
case and assert the full ordering across xs, m, l, and xl using the existing
mount/computed pattern.
optional/tokens.components.css (1)

52-60: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

Button tokens activation looks correct.

Values and fallbacks are consistent with the optional/components.css usage (e.g. --sf-btn-gap, --sf-btn-min-height). Nit: --sf-card-shadow--elevated and --sf-card-shadow--hover (lines 24-25) resolve to the identical var(--sf-shadow-l) value — likely intentional (shared elevation level) but worth a comment noting they're deliberately aliased rather than accidentally duplicated.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@optional/tokens.components.css` around lines 52 - 60, The card shadow tokens
in tokens.components.css are duplicated with the same var(--sf-shadow-l) value,
so add an explicit comment near the relevant --sf-card-shadow--elevated and
--sf-card-shadow--hover definitions to clarify they are intentionally aliased
for the same elevation level. Keep the existing token names and references in
optional/components.css unchanged, and make the intent obvious to future readers
where those shadow tokens are declared.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@configurator/src/data/classes.generated.json`:
- Line 82: Move the `is-disabled` and `is-loading` entries out of the `.sf-btn`
group in the generated data so they appear under a generic runtime-state
grouping instead. Update the relevant catalog data in classes.generated.json to
use a framework-wide state group consistent with `core/states.css`, keeping the
button-specific `.sf-btn` group for button-only classes.

In `@docs/api-index.md`:
- Line 1036: The generated API index is misclassifying shared state helpers by
labeling `is-disabled` and `is-loading` as `.sf-btn` instead of keeping them in
their generic state groups. Update the affected entries in the docs index so the
`is-disabled` and `is-loading` rows remain grouped under INTERACTIVITY and
LOADING / ASYNC FEEDBACK, and move any button-specific context into the
description text rather than the class/group label.

In `@docs/classes.md`:
- Around line 318-319: The `.is-disabled` and `.is-loading` rows are being
listed in the wrong catalog section, which makes the source mapping
inconsistent. Update the `docs/classes.md` section that contains these state
helpers so they are either moved back under the state-class section or the
section is renamed to reflect usage-based grouping, and keep the entries aligned
with their core state-class meaning rather than `optional/components.css`.

---

Outside diff comments:
In `@optional/components.css`:
- Around line 174-198: The .sf-btn.is-loading state currently only changes the
cursor and hides content, so it still allows clicks unlike the disabled states.
Update the `.sf-btn.is-loading` rule in `components.css` to also block pointer
interaction the same way `.sf-btn:disabled` and `.sf-btn.is-disabled` do, so
loading buttons cannot be activated again while async work is in progress. Keep
the spinner and visibility behavior in `.sf-btn.is-loading::after` unchanged.

---

Nitpick comments:
In `@optional/tokens.components.css`:
- Around line 52-60: The card shadow tokens in tokens.components.css are
duplicated with the same var(--sf-shadow-l) value, so add an explicit comment
near the relevant --sf-card-shadow--elevated and --sf-card-shadow--hover
definitions to clarify they are intentionally aliased for the same elevation
level. Keep the existing token names and references in optional/components.css
unchanged, and make the intent obvious to future readers where those shadow
tokens are declared.

In `@tests/button.spec.js`:
- Around line 1-182: The size-scale coverage in the .sf-btn Playwright spec is
incomplete because the current height ordering test only checks xs, m, and xl,
so it could miss a collision between the l and xl sizes. Update the size-scale
test in the button spec to include an sf-btn--l case and assert the full
ordering across xs, m, l, and xl using the existing mount/computed pattern.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro Plus

Run ID: ebcb2ca4-0ffe-42d4-8df7-b55148d74871

📥 Commits

Reviewing files that changed from the base of the PR and between 42e9dac and 66aedb8.

⛔ Files ignored due to path filters (2)
  • configurator/package-lock.json is excluded by !**/package-lock.json
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (28)
  • CHANGELOG.md
  • badges/css-custom-data.json
  • configurator/package.json
  • configurator/src/components/panels/BordersPanel.svelte
  • configurator/src/components/shell/PreviewPanel.svelte
  • configurator/src/data/api-index.generated.json
  • configurator/src/data/classes.generated.json
  • configurator/src/data/token-registry.generated.json
  • docs/api-index.json
  • docs/api-index.md
  • docs/classes.md
  • docs/components.md
  • docs/llm-guide.md
  • docs/registry.json
  • docs/roadmap.md
  • docs/test-coverage-6-token-reference.html
  • docs/token-annotations.json
  • docs/token-index.json
  • docs/token-index.md
  • docs/tokens.md
  • optional/components.css
  • optional/tokens.components.css
  • package.json
  • reports/full-api-audit/results/tokens-report.json
  • tests/button.spec.js
  • tests/card.spec.js
  • tests/token-api.snapshot.json
  • token-registry.json

Comment thread configurator/src/data/classes.generated.json Outdated
Comment thread docs/api-index.md Outdated
Comment thread docs/classes.md
claude added 2 commits July 5, 2026 18:13
…itives

A follow-up audit pass flagged a card flex/grid display toggle as
missing. Verified the other three flagged gaps (link-color, icon-size,
min-radius) are already covered by existing global tokens/.sf-icon, so
no new card-specific knobs were needed there. The body-layout gap is
better answered by composing the existing .sf-flow/.sf-cluster
primitives than by adding a card-specific display switch — document
that instead.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rU5ZV8C3RqDLbrXM41aMh
- states.css: give every section comment a recognized banner form
  (`/* -- TITLE -- */`) so the doc generator attributes is-disabled/
  is-loading to their real INTERACTIVITY/LOADING groups instead of
  falling through to .sf-btn's banner (the only later-scanned file with
  a real banner near those class names). Fixes generated-doc grouping
  in api-index.json/.md and the configurator's classes.generated.json.
- llm-guide.md: add the missing --sf-card-media-radius token to the
  card token list (present in source/registry, absent from the guide).
- tokens.components.css: comment clarifying that --sf-card-shadow--
  elevated and --hover intentionally alias the same --sf-shadow-l step.
- button.spec.js: extend the size-scale test to also assert --l sits
  between m and xl, closing a gap that could hide an --l/--xl collision.

Verified (not changed): .sf-btn.is-loading already gets pointer-events:
none from the generic .is-loading state class in core/states.css —
compound-selector specificity doesn't override a property the more
specific rule never sets, so no --loading state click-through exists.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_013rU5ZV8C3RqDLbrXM41aMh
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants